<?php
/*
 *
 * @package MoltX
 * @author $Author$
 * @version $Id$
 * @link $URL$
 * @copyright Copyright (c) 2005-2010, Matthew Oltendorf
 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
 *
 */

/*
 * @ignore
 */
if ( ! defined ( 'blink' ) )
{
	// Access denied.
	header ( $_SERVER [ 'SERVER_PROTOCOL' ] . ' 403 Forbidden' );
	echo '403 - Forbidden';

	exit;
}

/*
 * Passthrough module class
 * @package Blink
 *
 * Singleton
 */
final class blink_module
{
	/*
	 * Constructor function
	 *
	 * This is private to enforce singleton mode.
	 *
	 * @return null
	 */
	private function __construct ( )
	{
		return null;
	}

	/*
	 * Initiate function
	 *
	 * Start the module.
	 *
	 * @return null
	 */
	public static function initiate ( )
	{
		/*
		 * As this module is used by all local scripts, local room handlers,
		 * the global room handler, and the console, we need to find out what
		 * role we are playing.
		 */

		/*
		 * Should we just get rid of the passthrough module, and then convert
		 * all roles into modules themselves? It seems like we should; we have
		 * no special code that is really needed in this module, and this module
		 * is really just overcomplicating things.
		 */

		/*
		 * However, this module does make the startup feel cleaner. Maybe, since
		 * it has nothing special in it, we should rename it to none?
		 */

		// Load our role.
		include blink_system . '/role/' . blink :: $role . '.php';

		blink_role :: initiate ( );

		return null;
	}
}
